import React from 'react';
import RenderOperate from './components/RenderOperate';
import DataInfo from './components/DataInfo';
import Banner from './components/Banner';
import cls from './index.module.less';
import ContentCard from './components/card';
import { IBelong, ICompany } from '@/ts/core';
import TodoTable from './components/toDoList/TodoTable';
import TargetActivityNew from './components/dynamics/Dynamics';
import MatterInfo from './components/MatterInfo/newMatterinfo';
import MemberStatsCard from './components/Member/MemberStats';

// 工作台
const WorkBenchView: React.FC<{ space: IBelong }> = ({ space }) => {
  return (
    <div className="workbench-content">
      <Banner space={space}></Banner>
      <MatterInfo company={space as ICompany} />

      <div className={cls['content-module-1']}>
        {
          <div
            style={{
              flex: '0 0 66%',
              minHeight: '390px',
              maxHeight: '30%',
              display: 'flex',
              marginBottom: '10px',
            }}>
            <TodoTable target={space}></TodoTable>
          </div>
        }
        <div
          style={{
            flex: '0 0 33%',
            minHeight: '380px',
            maxHeight: '30%',
            display: 'flex',
          }}>
          <RenderOperate />
        </div>
      </div>
      <div className={cls['content-module-2']}>
        <div
          style={{
            flex: '0 0 66%',
            minHeight: '350px',
            height: '100%',
            display: 'flex',
            flexDirection: 'column',
          }}>
          <TargetActivityNew
            height={'300px'}
            activity={space.targets[0].session.activity}></TargetActivityNew>
        </div>
        <div style={{ flex: '0 0 33%', minHeight: '350px', display: 'flex' }}>
          <DataInfo space={space} />
        </div>
      </div>
      <div style={{ marginTop: '10px', width: '100%' }}>
        <MemberStatsCard space={space}></MemberStatsCard>
      </div>
      <ContentCard space={space} />
      <div className="cardGroup">
        <div className={cls['flex-space']}></div>
      </div>
    </div>
  );
};

export default WorkBenchView;
